package com.yfp.operation.mapper;

import com.yfp.operation.domain.StoredValueActivity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yfp.operation.domain.dto.StoredValueActivityDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author admin
* @description 针对表【stored_value_activity(储值活动)】的数据库操作Mapper
* @createDate 2024-11-22 10:17:26
* @Entity domain.com.yfp.operation.StoredValueActivity
*/
public interface StoredValueActivityMapper extends BaseMapper<StoredValueActivity> {

    /**
     * 储值活动列表
     * @param storedValueActivityDTO
     * @return
     */
    List<StoredValueActivity> activityList(StoredValueActivityDTO storedValueActivityDTO);

    /**
     * 新增储值活动
     * @param storedValueActivity
     */
    void add(StoredValueActivity storedValueActivity);

    /**
     * 根据活动名称统计数量
     * @param name
     * @return
     */
    Integer verifyName(String name);

    /**
     * 根据id修改状态
     * @param id
     * @param status
     */
    void updateStatus(@Param("id") Long id, @Param("status") Integer status);

    /**
     * 储值活动到期失效
     */
    void expire();
}




